<?php
//print_r(get_headers('http://localhost/kp5b_blog/index.php'),0);
//$ch = curl_init('http://localhost/kp5b_blog/index.php');
//curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'HEAD');

//$stmt = curl_exec($ch);
$url = 'http://localhost/kp5b_blog/index.php';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, TRUE);    //表示需要response header
curl_setopt($ch, CURLOPT_NOBODY, TRUE); //表示需要response body
//curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
//curl_setopt($ch, CURLOPT_FOLLOWLOCATION, FALSE);
//curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE);
//curl_setopt($ch, CURLOPT_TIMEOUT, 120);


$result = curl_exec($ch);
/*if(curl_getinfo($ch, CURLINFO_HTTP_CODE) == '200') {
	echo $result;
}*/

//echo curl_getinfo($ch,CURLINFO_FILETIME);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE);

?>